package com.onlyphoto.onlymall.mvp.presenter

import android.content.Context
import com.onlyphoto.onlymall.base.BaseNetworkResponse
import com.onlyphoto.onlymall.base.BaseObserver

import com.onlyphoto.onlymall.mvp.contract.CSetting
import com.onlyphoto.onlymall.mvp.model.MSettingImpl
import com.onlyphoto.onlymall.base.BasePresenter
import com.onlyphoto.onlymall.bean.response.AppUpdateBean


class PSettingImpl(mContext: Context, mView: CSetting.IVSetting) : BasePresenter<CSetting.IVSetting, MSettingImpl>(mContext, mView, MSettingImpl()), CSetting.IPSetting {
    override fun getAppUpdateInfo() {
        mModel.getAppUpdateInfo(object :BaseObserver<AppUpdateBean>(mContext.get()){
            override fun onSuccess(data: AppUpdateBean?, msg: String?) {
                mView.getAppUpdateInfoSuccess(data!!)
            }

            override fun onCodeError(t: BaseNetworkResponse<AppUpdateBean>?) {
            }

            override fun onFailure(e: Throwable?) {
            }

            override fun onRequestStart() {
            }

            override fun onFinally() {
            }

        })
    }
}
